from .page_base import BasePage
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

class ConsolePage(BasePage):
        def __init__(self,driver=None):
            super(ConsolePage,self).__init__(driver)
            
        @property
        def sub_title_element(self):
            WebDriverWait(self.driver,3).until(EC.visibility_of_element_located((By.XPATH,"/html/body/div/div/div/div/div[2]/div/main/h3")))
            sub_title = self.find_element(By.XPATH,"/html/body/div/div/div/div/div[2]/div/main/h3")
            return sub_title
        
        @property
        def system_version_element(self):
            return self.find_element(By.XPATH,"/html/body/div/div/div/div/div[2]/div/main/div[3]/div[1]/div/div[2]/div/div/div/div/div/div/table/tbody/tr[8]/td[2]")